<html>
    <head>
        @include('includes.header')
        <!-- .navbar -->
  
                <div style="float:right;" class="btn-group">      
                    {{ Helpers\Helper::image_link('language.select','assets/img/en.jpg',
                                'English',array('en'),array('class'=>'btn btn-default btn-sm'))
                    }} 
                    {{ Helpers\Helper::image_link('language.select','assets/img/albania.png',
                        'Albanian',array('al'),array('class'=>'btn btn-default btn-sm'))
                    }}
                </div> 
  
</head>
<body class="login">
    <div class="container">
        <p>
            {{ $errors->first('email') }}
            {{ $errors->first('password') }}
        </p>
        <div class="text-center">
            {{ HTML::image('assets/img/logo-6.png', 'National Logo') }}
        </div>

        <div class="tab-content">
            <div id="login" class="tab-pane active">
                {{ Form::open(array(
                            'url'=>'users/signin', 
                            'class'=>'form-signin',
                            'id' => 'form-signin')) }}
                <p class="text-muted text-center">
                    {{Lang::get('login.login_label')}}
                </p>
                {{ Form::text('email', null, array(
                            'class'=>'form-control', 
                            'placeholder'=>Lang::get('login.email'))) 
                }}
                {{ Form::password('password', array(
                            'class'=>'form-control', 
                            'placeholder'=>Lang::get('login.password'))) 
                }}
                {{ Form::submit('Login', array(
                            'class'=>'btn btn-lg btn-primary btn-block'))
                }}
                <br/><div id="validation-login"  class="">
                </div>                                       
                {{ Form::close() }}
            </div>
            <div id="signup" class="tab-pane">
                {{ Form::open(array(
                            'url'=>'users/register', 
                            'class'=>'form-signup',
                            'id' => 'form-register')) 
                }}
                {{ Form::text('username', null, array(
                            'class'=>'form-control', 
                            'placeholder'=>Lang::get('login.username'))) 
                }}
                {{ Form::text('email', null, array(
                            'class'=>'form-control', 
                            'placeholder'=>Lang::get('login.email'))) 
                }} 
                {{ Form::text('firstname', null, array(
                            'class'=>'form-control', 
                            'placeholder'=>Lang::get('login.first_name')))
                }}
                {{ Form::text('lastname', null, array(
                            'class'=>'form-control', 
                            'placeholder'=>Lang::get('login.last_name')))
                }}                    
                {{ Form::password('password', array(
                            'class'=>'form-control', 
                            'placeholder'=>Lang::get('login.password'))) 
                }}
                {{ Form::password('password_confirmation', array(
                            'class'=>'form-control', 
                            'placeholder'=>Lang::get('login.confirm_password'))) 
                }}                   
                {{ Form::submit('Register', array(
                            'class'=>'btn btn-lg btn-success btn-block'))
                }}
                <br/>
                <div id="validation-div" class="">
                </div>
                {{ Form::close() }}                    
            </div>
        </div>
        <div class="text-center">
            <ul class="list-inline">
                <li> <a class="text-muted" href="#login" data-toggle="tab">{{Lang::get('login.login')}}</a>  </li>
                <li> <a class="text-muted" href="#signup" data-toggle="tab">{{Lang::get('login.signup')}}</a>  </li><br/>
                <li>{{ Helpers\Helper::image_link('UserController@loginWithGoogle','assets/img/google_70.png','google login')
                    }} </li>
            </ul>
        </div>
    </div><!-- /container -->
    {{ HTML::script('assets/js/jquery.validate-login.js')}}
    {{ HTML::script('assets/lib/jquery/jquery.min.js') }}
    {{ HTML::script('assets/lib/bootstrap/js/bootstrap.min.js')}}
    <script>
        $('.list-inline li > a').click(function() {
            var activeForm = $(this).attr('href') + ' > form';
            //console.log(activeForm);
            $(activeForm).addClass('magictime swap');
            //set timer to 1 seconds, after that, unload the magic animation
            setTimeout(function() {
                $(activeForm).removeClass('magictime swap');
            }, 1000);
        });
    </script>
</body></html>
